﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CarsSlider.ascx.cs" Inherits="CarRental.Control.CarsSlider" %>

<link href="/Styles/anythingslider.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery.anythingslider.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $('#cars-slider ul').anythingSlider(
            {
                mode: "fade",
                hashTags: false,
                autoPlay: true,
                delay: 5000
            }
        );
    });
</script>

<div id="cars-slider">
    <ul>
    <asp:Repeater ID="rCarsSlider" runat="server">
        <ItemTemplate>
        <li>
            <div class="slider-content">
                <img src="/media/images/promo/p<%# Eval("Id") %>.jpg" alt="<%# Eval("Producer") %> <%# Eval("Model") %>" />
                <div class="slider-panel">
                    <h3><%# Eval("Producer.ProducerName")%></h3>
                    <p><%# Eval("Model.ModelName") %>, rocznik <%# DataBinder.Eval(Container.DataItem, "ProductionYear","{0 :yyyy}")%></p>
                </div>
            </div>
        </li>
        </ItemTemplate>
    </asp:Repeater>
    </ul>
</div>